# -*- coding: UTF-8 -*-
import json
import requests

url = 'https://api.inews.qq.com/newsqa/v1/query/pubished/daily/list?province=%E6%B9%96%E5%8C%97'
header = {
    'Host': 'api.inews.qq.com',
    'User-Agent': 'Opera/7.52 (Windows NT 5.1; U) [en]',
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
    'Accept-Encoding': 'gzip, deflate, br',
    'Origin': 'https://news.qq.com',
    'Connection': 'keep-alive',
    'Referer': 'https://news.qq.com//zt2020/page/feiyan.htm',
    'Cache-Control': 'max-age=0}',
}
response = requests.get(url=url, headers=header, timeout=60)
response.encoding = 'utf-8'
print(response.text)
dic = json.loads(response.text)['data']
for d in dic:
    print(d)
